//
//  UIImage+ZCHelp.h
//  UniversalApp
//
//  Created by 凯朱 on 2019/6/1.
//  Copyright © 2019 徐阳. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIImage (ZCHelp)
-(NSData *)imageToData;
//压缩图片到多少 fileBytes kb为单位 - 列 500kb 传500
-(NSData *)scaleWithFileBytes:(NSInteger )fileBytes;

/**
 *scrollView截取的视图，tableView亦可，
 *saveToAlbum是否保存图片至相册，
 *block进度，progress=0为开始，progress=1为结束，可绘制loading图，文字提示等。
 */
+ (UIImage *)snapshotScreenIn:(UIScrollView *)scrollView andSaveToAlbum:(BOOL)saveToAlbum andProgressing:(void(^)(CGFloat progress))block;
@end

NS_ASSUME_NONNULL_END
